import React, { Component } from 'react';

import connect from './pages/redux-component/connect'

@connect
class Index extends Component {
  state = { 
    bool:true
   }
  render() { 
    // console.log(this.props.isLogin)
    return ( 
      <>
        {
          this.state.bool?<div>ratat</div>:<div>flower</div>
        }
        <button onClick={()=>this.handleClick()}>12223</button>
        <button onClick={()=>this.logout()}>logout</button>
        <p>{this.props.isLogin?'true':'false'}</p>
      </>
     );
  }
  handleClick(){
    this.props.sagaChangelogin({email:'847251198@qq.com',password:'1234567890'})
    this.setState({
      bool:!this.state.bool
    })
  }
  logout(){
    this.props.logout()
  }
}
 
export default Index;